package base;

public class TraverseDemo {

    public static void main(String[] args) {
        int[] arr = {12,34,6,7,8};

        //for循环
        for(int i=0;i<arr.length;i++){
            System.out.println(arr[i]);
        }

        //foreach循环
        for(int n: arr){
            System.out.println(n);
        }
    }
}
